#include<stdio.h>

int main()
{
	FILE * fp;

	fp = fopen("file.txt", "w+");
	fprintf(fp, "%s %s %s %d", "We", "are", "in", 2018);
	fclose(fp);
	
	fp = fopen("file.txt", "r");
	int c;
	while(1){
		c = fgetc(fp);
		if(feof(fp)){
			break;
		}else{
			printf("%c",c);
		}
	}
	fclose(fp);
	return 0;
}
